package com.campsys.service.dto;

import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;

@Data
public class TeachingUnitDTO {
    
    private Long id;
    
    @NotNull(message = "课程ID不能为空")
    private Long courseId;
    
    private Long parentId = 0L;  // 默认为章级别
    
    @NotBlank(message = "标题不能为空")
    private String title;
    
    private String description;
    
    @NotNull(message = "类型不能为空")
    private Integer type;  // 1-章，2-节
    
    private Integer sort = 0;
    
    private String documentUrl;
    
    private String videoUrl;
    
    @Min(value = 0, message = "积分不能为负数")
    private Integer points = 0;
    
    private Integer status = 0;  // 默认未发布
} 